<?php

class Application_Form_Smtp extends Zend_Form
{

    public function init()
    {
    	$this->setName('form_smtp');
        $this->setAction('');
        $this->setMethod('post');
    	
    	$t = Zend_Registry::get('translator');
    	
      	$salvar = new Zend_Form_Element_Submit($t->translate('SALVAR'));
        $salvar->setAttribs(array('title'=>$t->translate('SALVAR'), 'style'=>'font-weight:bold;'));
 		
        $smtp = new Zend_Form_Element_Text('smtp');
        $smtp->setAttribs(array('size'=>'50'))
        	->setAttrib('title', 'Smtp')
       		  ->setLabel('Smtp:')
       		  ->setRequired(true);
       		  
        $conta = new Zend_Form_Element_Text('conta');        
        $conta->setAttribs(array('size'=>'50'))
          	  ->setAttrib('title', $t->translate('CONTA'))
        	  ->setLabel($t->translate('CONTA').':')
        	  ->setRequired(true);
        	  
        $senha = new Zend_Form_Element_Text('senha');        
        $senha->setAttribs(array('size'=>'50'))
          	  ->setAttrib('title', $t->translate('SENHA'))
        	  ->setLabel($t->translate('SENHA').':')
        	  ->setRequired(true); 
        	  
        $ssl = new Zend_Form_Element_Text('ssl');        
        $ssl->setAttribs(array('size'=>'15'))
          	  ->setAttrib('title','ssl')
        	  ->setLabel('Ssl:')
        	  ->setRequired(true); 
        	  
        $porta = new Zend_Form_Element_Text('porta');        
        $porta->setAttribs(array('size'=>'15'))
          	  ->setAttrib('title',$t->translate('PORTA'))
        	  ->setLabel($t->translate('PORTA').':')
        	  ->setRequired(true);
        	  
        $idconfig = new Zend_Form_Element_Hidden('idconfig');
        	  
        $envioHora = new Zend_Form_Element_Text('envioPorHora');        
        $envioHora->setAttribs(array('size'=>'15'))
          	  ->setAttrib('title',$t->translate('ENVIO_POR_HORA'))
        	  ->setLabel($t->translate('ENVIO_POR_HORA').':')
        	  ->setRequired(true);

        $this->addElements(array($smtp,$conta,$senha,$ssl,$porta,$envioHora,$idconfig,$salvar));
        $this->clearDecorators();
    }
}

